from django.db import models

# Create your models here.
# class questions(models.Model):
#     TYPE=[('0','填空'),('1','单选'),('2','简答')]
#     CASTE=[('0','简单'),('1','一般'),('2','困难')]
#     title=models.CharField(max_length=1,choices=TYPE)
#     caste=models.CharField(max_length=1,choices=CASTE)
#     answer=models.CharField(max_length=100)

class teacher(models.Model):
    TYPE=[('0','院长'),('1','主任'),('2','导员'),('3','讲师')]
    TSEX=[('0','女'),('1','男')]
    tname=models.CharField(max_length=10)
    tsex=models.CharField(max_length=1,choices=TSEX)
    tdate=models.DateField()
    tphone=models.CharField(max_length=11,unique=True,null=False)
    professional=models.CharField(max_length=1,choices=TYPE)

class student(models.Model):
    SEX = [('0', '女'), ('1', '男')]
    stuname=models.CharField(max_length=10)
    stusex=models.CharField(max_length=1,choices=SEX)
    studate=models.DateField()
    stuphone=models.CharField(max_length=11,unique=True,null=False)
    grade=models.CharField(max_length=20)
    tid=models.ForeignKey(teacher,on_delete=models.CASCADE)